<?
$order = get_segment(4);
?>
<h1 class="ttt"><span>تتبع الطلب <?php echo substr($item->title,0,50) ?> .. </span></h1>
<div id="inner">
    <div class="submit" id="ui-state-persist">
        <a href="<?php echo base_url() ?><?php echo get_segment(1) ?>/<?php echo get_segment(2) ?>/<?php echo get_segment(3) ?>/up" data-role="button" data-theme="b"  data-icon="arrow-u" data-mini="true" data-iconpos="right"  <? if ($order == 'up' || empty($order)) { ?>class="ui-btn-active ui-state-persist" <? } ?> ><?php echo lang('label_sort_order_desc') ?></a>
        <a href="<?php echo base_url() ?><?php echo get_segment(1) ?>/<?php echo get_segment(2) ?>/<?php echo get_segment(3) ?>/dw" data-role="button" data-theme="b" data-icon="arrow-d" data-mini="true" data-iconpos="right" <? if ($order == 'dw') { ?> class="ui-btn-active ui-state-persist" <? } ?> ><?php echo lang('label_sort_order_asc') ?></a>
    </div>
    <table class="tables">
        <thead>
            <tr class="head-row">
                <th><?= lang('label_statues') ?></th>
                <th><?php echo lang('label_created_date') ?></th>
                <th><?= lang('label_note') ?></th>
            </tr>
        </thead>
        <tbody>
            <?
            foreach ($histroy as $value) {
                ?>
                <tr class="row">
                    <td style="width: 200px;"><?php echo $value->title ?></td>
                    <td  style="width: 250px;"><?php echo timespan($value->create_date) ?></td>
                    <td><?php echo $value->note ?></td>
                </tr>
            <?
        }
        ?>
            </tbody>
    </table>
</div>